<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../static/lib/jquery-2.2.3.min.js"></script>
    <style>
        * body {
            margin: 0;
            padding: 0;
        }
    </style>
</head>
<div>
{#    <div><span id="play">播放</span></div>#}
    <img id="img" src="./static/img/1.jpg" alt="">
</div>
<body>
<script>
    $("#img").click(function () {
        var url = window.location.search.split("=")[1];
        console.log(url)
        url = "rtsp://wowzaec2demo.streamlock.net/vod/mp4:BigBuckBunny_115k.mov";
        if (url) {
            $.ajax({
                url: "/video",
                data: url,
                type: "get",
                success: function (data) {
                    console.log(data);
                    var num = 0
                    setInterval(() => {
                        $("img").attr("src", "./static/img/videoPlay.jpg?" + num++);
                    }, 70)
                }
            })
        }
    })


</script>
</body>
</html>